﻿using System.Collections.Generic;
using Newtonsoft.Json;

namespace ZilLion.Service.WeChatMall.Domain.Entitys.AppInfo
{
    public class AppInfoDto
    {
        /// <summary>
        ///     app 基础信息
        /// </summary>
        [JsonProperty("basicinfo")]
        public AppBasicInfoEntity AppBasicInfo { get; set; }

        /// <summary>
        ///     app 风控信息
        /// </summary>
        [JsonProperty("rainfo")]
        public AppRaInfoEntity AppRaInfo { get; set; }

        /// <summary>
        ///     跑马灯地址数组
        /// </summary>
        [JsonProperty("swipepics")]
        public string[] SwipePics
        {
            get
            {
                if (AppBasicInfo != null && AppBasicInfo.SwipePics.IsNotNullOrEmpty())
                    return AppBasicInfo.SwipePics.Split(",");
                return new List<string>().ToArray();
            }
        }

        /// <summary>
        ///     快速备注
        /// </summary>
        [JsonProperty("fixedremarks")]
        public IList<string> FixedRemarks
        {
            get
            {
                if (AppBasicInfo != null && AppBasicInfo.FixedRemarks.IsNotNullOrEmpty())
                    return AppBasicInfo.FixedRemarks.Split(",");
                return new List<string>().ToArray();
            }
        }
    }
}